home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / WINPROGS / WPJV1N7.ZIP / RTFGEN.ZIP / RTFGEN < prev    next >
Text File  |  1992-02-23  |  20KB  |  693 lines

  1. \docstart
  2. \title Contents`
  3. \topic contents`
  4. \keyword contents`
  5. \browse general:004`
  6. \b
  7. ==========
  8. \b Contents`
  9.  
  10. [Overview:overview]`
  11. [General Editing Considerations:EditingConsiderations]`
  12. [RTFGEN Defaults:Defaults]`
  13. [Steps for Building a Help File:basicsteps]`
  14. [ASCII Input File Layout:layout]`
  15. [Commands:Commands]`
  16. [References:References]`
  17. [Copyright:Copyright]`
  18. ----------
  19.  
  20. \topic Commands`
  21. \title Commands`
  22. \keyword commands`
  23. \browse general:030`
  24. ========
  25. \b Commands`
  26.  
  27. [Command Syntax:CommandSyntax]`
  28. RTFGEN Commands`
  29.    [Topic Header Commands:TopicHeaderCommands]`
  30.    [Cross Reference Commands:CrossReferences]`
  31.    [Definitions:Definitions]`
  32.    [Bitmap Commands:BitmapCommands]`
  33.    [Block Formatting Commands:BlockFormatting]`
  34. RTF Commands`
  35.    [Font Commands:FontCommands]`
  36.    [Paragraph Commands:ParagraphCommands]`
  37.    [Tabbing Commands:TabbingCommands]`
  38. ------
  39.  
  40. \title Overview`
  41. \topic overview`
  42. \browse general:005`
  43. ===========
  44. \b Overview`
  45.  
  46. Normally, to create a help file with the Windows help compiler,
  47. you must first write a help topic file using a Rich Text Format (RTF)
  48. word processor.  For many, there are two problems here:`
  49.  
  50. \blockstart \li500\fi-240`
  51.   1. RTF word processors are expensive.`
  52.   2. Learning to use a new word processor is a nuisance and not
  53.      very productive.`
  54. \blockend
  55.  
  56. RTFGEN solves both these problems by allowing you to use your favorite
  57. ASCII text editor to produce RTF formatted files acceptable to the
  58. help compiler.`
  59. --------------
  60.  
  61. \title General Editing Considerations`
  62. \topic EditingConsiderations`
  63. \keyword special characters;tabs`
  64. \keyword comments`
  65. \browse general:010`
  66. ========
  67. \b General Editing Considerations`
  68.  
  69. Almost any ASCII editor may be used.  I use Borland's TURBO or 
  70. TPW.  It's probably best to turn off options like 'optimal fill' 
  71. which can leave invisible and possibly unknown tab characters in the
  72. document.`
  73.  
  74. The use of tabs is required to obtain column allignment with 
  75. proportional fonts.  Either the tab character or the RTF command, 
  76. [\\tab:TabbingCommands], may be used with the same effect.
  77. The \\tab has the advantage
  78. that it's visible in your ASCII file.`
  79.  
  80. RTFGEN and/or the RTF language have special use for the following 
  81. characters:`
  82.  
  83. \blockstart \li1200\tx1200\fi-840`
  84.   {\b\`}    (grave accent) Used to mark end of paragraphs.`
  85.   {\b\[}, {\b\]}    Used to mark jumps and definitions.`
  86.   {\b\{}, {\b\}}    Used to mark areas where font characteristics will change.`
  87.   {\b\\}    Used as a command start character.`
  88. \blockend
  89.  
  90. When these characters are to be used in the text, they should be 
  91. preceded by a '\\'.  Thus, '\\\[' will cause the left bracket to be 
  92. inserted in text and '\\\\' will result in a single backslash being 
  93. inserted in text.`
  94.  
  95. ( * . . . * ) may be used to insert comments within the text.`
  96. --------
  97.  
  98. \title RTFGEN Defaults`
  99. \topic Defaults`
  100. \keyword defaults`
  101. \browse general:015`
  102. =======
  103. \b RTFGEN Defaults`
  104.  
  105.    Helv, 10 point font.`
  106.  
  107.    Paragraphs are left justified.  The first line is not
  108.    indented.`
  109.  
  110.    Paragraph indentation is set by indentation of the first
  111.    line of the paragraph.`
  112.  
  113.    Tabs are spaced every 720 [[twips:twipdef]] (about 6 default
  114.    characters).`
  115.  
  116. Any of these defaults may be changed globally for the whole 
  117. document, or locally at the topic, paragraph, or even character level.`
  118. ---------
  119.  
  120. \title Steps for Building a Help File`
  121. \topic basicsteps`
  122. \keyword steps for building a help file;building a help file`
  123. \browse general:020`
  124. =========
  125. \b Steps for Building a Help File`
  126.  
  127. The steps required to create a Windows help file using RTFGEN 
  128. are:`
  129.  
  130. \blockstart \li600\fi-240`
  131.      1. Using an ASCII editor, create one or more input text files.
  132.     [See input file layout:layout]`
  133.      2. Use RTFGEN to convert these files to RTF files.`
  134.      3. Create a Help Project File (.HPJ) for input to the help
  135.     compiler.  This file should reference the RTF files.`
  136.      4. Run the help compiler to make the help file.`
  137. \blockend
  138.  
  139. Steps 3 and 4 are described in the help compiler documentation.
  140. This documentation deals with the first two steps only.`
  141.  
  142. Once the ASCII files have been written,  RTFGEN is used to 
  143. convert them to suitable RTF format.  The file, [[HEADING:headingDef]],
  144. must be present on the default drive.  From the DOS prompt:`
  145.  
  146.   RTFGEN  \[Infile \[Outfile\]\]`
  147.  
  148. The optional filenames specify the names of the ASCII input file 
  149. and the RTF file to be generated.  If no extensions are given,
  150. .RTF is used by default for the output file.  If the output
  151. filename is missing from the command line, an RTF file will be 
  152. created using the same name as the source file.  When neither 
  153. filename is specified, names will be requested once execution 
  154. starts.`
  155.  
  156.   RTFGEN MYHELP`
  157.  
  158. will cause RTFGEN to look for a source file, MYHELP and create an
  159. object file, MYHELP.RTF.`
  160. -----------
  161.  
  162. \title HEADING File`
  163. \topic headingDef`
  164. \keyword HEADING`
  165. ========
  166. The file, HEADING, is copied to the start of each RTF file generated.
  167. Along with some boilerplate RTF commands, it contains the font table
  168. defining fonts by number.`
  169. --------
  170.  
  171. \title ASCII Input File Layout`
  172. \topic layout`
  173. \keyword layout;ASCII input file layout;input file layout`
  174. \browse general:025`
  175. \li600\brdrl\brdrr\ri600\sb-50\sa-50  (*general paragraph stuff for whole topic*)
  176. ==========
  177. \pard\b RTFGEN ASCII Input File Layout`
  178.  
  179. \brdrt\qc {\fs16 [document header:doc_header]}  `
  180. \b[[\\docstart:docstartDef]]{\fs30  }` (*space of larger font gives more height *)
  181. \qc  {\fs16 [topic header:topicHeader]} `
  182.  ===========[[==:EqualDef]]`
  183.     `
  184. \qc\fs16 [topic text:TopicText]`
  185.     `
  186.  - - - - - - - - - - - [[- -:HyphenDef]]`
  187.   \blockstart \li600`
  188.   . . . . . .`
  189.   \blockend
  190. \qc \fs16 [topic header:TopicHeader]`
  191.  ===========[[==:EqualDef]]`
  192.     `
  193. \qc\fs16 [topic text:TopicText]`
  194.     `
  195.  - - - - - - - - - - - [[- -:HyphenDef]]`
  196. \brdrb\b [[\\docend:DocendDef]]`
  197. ------------
  198. \topic TwipDef`
  199. ======
  200. TWIP: A 20th of a point.  For our purposes, 1440 twips per inch.
  201. One 10 point character is about 120 twips wide.`
  202. ------
  203. \topic EndofParaDef`
  204. ======
  205. A grave accent, '{\b\`}', is used to mark paragraph  ends.`
  206. -----
  207. \topic DocstartDef`
  208. =========
  209. The command, \\docstart, marks the end of the document header and the
  210. start of the topics.`
  211. -----------
  212. \topic DocendDef`
  213. ========
  214. The command, \\docend, marks the end of the document.`
  215. ----------
  216. \topic EqualDef`
  217. \title Start of Topic Text Marker`
  218. \keyword ========`
  219. =========
  220. \b Start of Topic Text Marker`
  221.  
  222. A row of 5 or more '='s starting in column 1 marks the end of a topic header
  223. and the start of the topic text.`
  224. -------
  225. \topic HyphenDef`
  226. \title End of Topic Marker`
  227. \keyword - - - - - - -;formfeed`
  228. ======
  229. \b End of Topic Marker`
  230.  
  231. A row of 5 or more hyphens starting in column 1 marks the end of a topic.`
  232.  
  233. An optional formfeed or several blank lines may follow the row of hyphens
  234. to better format your ASCII file.`
  235. --------
  236. \title Document Header`
  237. \topic Doc_Header`
  238. \keyword document header;\\docstart`
  239. ============
  240. \b Document Header`
  241.  
  242. The optional document header may contain commands to overide the
  243. [[RTFGEN defaults:defaults]].  Commands
  244. changing the font, font size, or paragraph first line indent might be
  245. appropriate here.`
  246.  
  247. The \\docstart command follows the document header to mark the start of
  248. the topics.`
  249.  
  250. Example:`
  251.  
  252. \\f0 \\fs24   ( * Times Roman font, 12 pitch for entire help file * )`
  253. \\docstart`
  254. ------------
  255. \title Topic Header`
  256. \topic TopicHeader`
  257. \keyword topic header`
  258. ===========
  259. \b Topic Header`
  260.  
  261. The topic header contains commands defining build tags, context 
  262. strings, title, keywords, and browse sequence number as appropriate for the
  263. topic.  Topic global formatting commands may also be included.
  264. The topic header section is terminated with a row of 5 or more
  265. '='s.`
  266.  
  267.    Example:`
  268.  
  269.    \\title Table of Contents\``
  270.    \\topic contents\``
  271.    \\keyword contents\``
  272.    \\f0 \\fs24   ( * Times Roman font, 12 pitch for this topic * )`
  273.    ============  ( * end of topic header * )`
  274.  
  275. \b